package org.darkforest.common.services;

import org.darkforest.model.GoodsCommon;
import org.darkforest.model.GoodsCommonWithBLOBs;
import org.darkforest.model.GoodsDetail;

import java.util.List;
import java.util.Map;

/**
 * Created by Libing on 2015/7/11.
 */
public interface GoodsCommonService {

    /**
     * 商品定时上架
     * @param map
     */
    void GroundingGoods(Map<String, Object> map);

    List<GoodsCommon> findGoodsCommonByCondition(GoodsCommon goodsCommon);

    void soldOutStoreGoods(Map map);

    /**
     * 根据主键查询
     * @param goodsCommonid
     * @return
     */
    GoodsCommonWithBLOBs selectById(Integer goodsCommonid);

    /**
     *
     * @param gc
     * @return
     */
    int insertBySelective(GoodsCommonWithBLOBs gc);

    /**
     * 根据commonid查询goodsCommon 以及 goodsCommon对应的goods
     * @param goodsCommonid
     * @return
     */
    GoodsCommonWithBLOBs getGoodsCommonWithBlobsAndGoodsById(Integer goodsCommonid);

    /**
     * 获取商品详情信息，商品详情页面专用
     * @param goodsCommonId
     * @return
     */
    GoodsDetail getGoodsDetail(Integer goodsCommonId);

    List<GoodsCommon> findSimpleGoodsCommonByCond(GoodsCommon param);
}
